﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace jogoLudumdare
{
    class Language : State
    {
        Texture2D Escolha;


        public Language(ContentManager content)
        {

            Escolha = content.Load<Texture2D>("language");
        }

        public void Update(GameTime gameTime)
        {

        }
        public void Draw(SpriteBatch spriteBatch, MouseState mouse)
        {

            spriteBatch.Draw(Escolha, Vector2.Zero, Color.White);
            if (mouse.X > 97 && mouse.X < 97+227 &&
                mouse.Y > 287 && mouse.Y < 287+73 &&
             mouse.LeftButton == ButtonState.Pressed)
            {
                Game1.IdiomaAtual = Game1.EstadoIdioma.Ingles;

                
                nextState = GameState.Abertura;
            }
            else if (mouse.X > 432 && mouse.X < 432 + 285 &&
                mouse.Y > 287 && mouse.Y < 287 + 73 &&
             mouse.LeftButton == ButtonState.Pressed)
            {
                Game1.IdiomaAtual = Game1.EstadoIdioma.Portugues;
                nextState = GameState.Abertura;
            }


        }


    }
}
